import 'package:flutter/material.dart';

class MyApp8 extends StatelessWidget {
  const MyApp8({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //导航条
      appBar: AppBar(
        title: const Text(
          'Flutter初体验',
          style: TextStyle(color: Colors.white, fontSize: 20),
        ),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      //主体区域
      body: Center(
        //子区域
        child: Center(
          child: Container(
            width: 200,
            height: 300,
            color: Colors.cyan,
            child: Column(
              //设置主轴对齐方式
              mainAxisAlignment: MainAxisAlignment.center,
              //侧轴的对齐方式  //侧轴默认居中
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Image.network(
                  'https://yanxuan-item.nosdn.127.net/72e734dd1a4d35ce650afebdaa600b57.png',
                  width: 126,
                ),
                SizedBox(height: 10), //间距
                Text('美妆效果嘎嘎不卡粉末面刷'),
                Padding(
                  padding: EdgeInsets.only(top: 10),
                  child: Text('￥99.90'),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
